\(\int \frac {1}{(a+b \tan ^2(e+f x))^{3/2}} \, dx\) [136]

   Optimal result
   Rubi [A] (verified)
   Mathematica [C] (warning: unable to verify)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [F(-2)]
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 16, antiderivative size = 85 \[ \int \frac {1}{\left (a+b \tan ^2(e+f x)\right )^{3/2}} \, dx=\frac {\arctan \left (\frac {\sqrt {a-b} \tan (e+f x)}{\sqrt {a+b \tan ^2(e+f x)}}\right )}{(a-b)^{3/2} f}-\frac {b \tan (e+f x)}{a (a-b) f \sqrt {a+b \tan ^2(e+f x)}} \]

[Out]

arctan((a-b)^(1/2)*tan(f*x+e)/(a+b*tan(f*x+e)^2)^(1/2))/(a-b)^(3/2)/f-b*tan(f*x+e)/a/(a-b)/f/(a+b*tan(f*x+e)^2
)^(1/2)

Rubi [A] (verified)

Time = 0.07 (sec) , antiderivative size = 85, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3742, 390, 385, 209} \[ \int \frac {1}{\left (a+b \tan ^2(e+f x)\right )^{3/2}} \, dx=\frac {\arctan \left (\frac {\sqrt {a-b} \tan (e+f x)}{\sqrt {a+b \tan ^2(e+f x)}}\right )}{f (a-b)^{3/2}}-\frac {b \tan (e+f x)}{a f (a-b) \sqrt {a+b \tan ^2(e+f x)}} \]

[In]

Int[(a + b*Tan[e + f*x]^2)^(-3/2),x]

[Out]

ArcTan[(Sqrt[a - b]*Tan[e + f*x])/Sqrt[a + b*Tan[e + f*x]^2]]/((a - b)^(3/2)*f) - (b*Tan[e + f*x])/(a*(a - b)*
f*Sqrt[a + b*Tan[e + f*x]^2])

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 385

Int[((a_) + (b_.)*(x_)^(n_))^(p_)/((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Subst[Int[1/(c - (b*c - a*d)*x^n), x]
, x, x/(a + b*x^n)^(1/n)] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && EqQ[n*p + 1, 0] && IntegerQ[n]

Rule 390

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Simp[(-b)*x*(a + b*x^n)^(p + 1)*
((c + d*x^n)^(q + 1)/(a*n*(p + 1)*(b*c - a*d))), x] + Dist[(b*c + n*(p + 1)*(b*c - a*d))/(a*n*(p + 1)*(b*c - a
*d)), Int[(a + b*x^n)^(p + 1)*(c + d*x^n)^q, x], x] /; FreeQ[{a, b, c, d, n, q}, x] && NeQ[b*c - a*d, 0] && Eq
Q[n*(p + q + 2) + 1, 0] && (LtQ[p, -1] ||  !LtQ[q, -1]) && NeQ[p, -1]

Rule 3742

Int[((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x]
, x]}, Dist[c*(ff/f), Subst[Int[(a + b*(ff*x)^n)^p/(c^2 + ff^2*x^2), x], x, c*(Tan[e + f*x]/ff)], x]] /; FreeQ
[{a, b, c, e, f, n, p}, x] && (IntegersQ[n, p] || IGtQ[p, 0] || EqQ[n^2, 4] || EqQ[n^2, 16])

Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {1}{\left (1+x^2\right ) \left (a+b x^2\right )^{3/2}} \, dx,x,\tan (e+f x)\right )}{f} \\ & = -\frac {b \tan (e+f x)}{a (a-b) f \sqrt {a+b \tan ^2(e+f x)}}+\frac {\text {Subst}\left (\int \frac {1}{\left (1+x^2\right ) \sqrt {a+b x^2}} \, dx,x,\tan (e+f x)\right )}{(a-b) f} \\ & = -\frac {b \tan (e+f x)}{a (a-b) f \sqrt {a+b \tan ^2(e+f x)}}+\frac {\text {Subst}\left (\int \frac {1}{1-(-a+b) x^2} \, dx,x,\frac {\tan (e+f x)}{\sqrt {a+b \tan ^2(e+f x)}}\right )}{(a-b) f} \\ & = \frac {\arctan \left (\frac {\sqrt {a-b} \tan (e+f x)}{\sqrt {a+b \tan ^2(e+f x)}}\right )}{(a-b)^{3/2} f}-\frac {b \tan (e+f x)}{a (a-b) f \sqrt {a+b \tan ^2(e+f x)}} \\ \end{align*}

Mathematica [C] (warning: unable to verify)

Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.

Time = 6.41 (sec) , antiderivative size = 232, normalized size of antiderivative = 2.73 \[ \int \frac {1}{\left (a+b \tan ^2(e+f x)\right )^{3/2}} \, dx=\frac {\cos (e+f x) \sin (e+f x) \left (\frac {4 (a-b) \operatorname {Hypergeometric2F1}\left (2,2,\frac {7}{2},\frac {(a-b) \sin ^2(e+f x)}{a}\right ) \sin ^2(e+f x) \left (a+b \tan ^2(e+f x)\right )}{a^2}-\frac {15 \left (2 b+3 a \cot ^2(e+f x)\right ) \left (-a \sec ^2(e+f x) \sqrt {\frac {(a-b) \left (b+a \cot ^2(e+f x)\right ) \sin ^4(e+f x)}{a^2}}+\arcsin \left (\sqrt {\frac {(a-b) \sin ^2(e+f x)}{a}}\right ) \left (a+b \tan ^2(e+f x)\right )\right )}{a (a-b) \sqrt {\frac {(a-b) \left (b+a \cot ^2(e+f x)\right ) \sin ^4(e+f x)}{a^2}}}\right )}{15 a f \sqrt {a+b \tan ^2(e+f x)}} \]

[In]

Integrate[(a + b*Tan[e + f*x]^2)^(-3/2),x]

[Out]

(Cos[e + f*x]*Sin[e + f*x]*((4*(a - b)*Hypergeometric2F1[2, 2, 7/2, ((a - b)*Sin[e + f*x]^2)/a]*Sin[e + f*x]^2
*(a + b*Tan[e + f*x]^2))/a^2 - (15*(2*b + 3*a*Cot[e + f*x]^2)*(-(a*Sec[e + f*x]^2*Sqrt[((a - b)*(b + a*Cot[e +
 f*x]^2)*Sin[e + f*x]^4)/a^2]) + ArcSin[Sqrt[((a - b)*Sin[e + f*x]^2)/a]]*(a + b*Tan[e + f*x]^2)))/(a*(a - b)*
Sqrt[((a - b)*(b + a*Cot[e + f*x]^2)*Sin[e + f*x]^4)/a^2])))/(15*a*f*Sqrt[a + b*Tan[e + f*x]^2])

Maple [A] (verified)

Time = 0.06 (sec) , antiderivative size = 102, normalized size of antiderivative = 1.20

method result size
derivativedivides \(\frac {-\frac {b \tan \left (f x +e \right )}{\left (a -b \right ) a \sqrt {a +b \tan \left (f x +e \right )^{2}}}+\frac {\sqrt {b^{4} \left (a -b \right )}\, \arctan \left (\frac {b^{2} \left (a -b \right ) \tan \left (f x +e \right )}{\sqrt {b^{4} \left (a -b \right )}\, \sqrt {a +b \tan \left (f x +e \right )^{2}}}\right )}{\left (a -b \right )^{2} b^{2}}}{f}\) \(102\)
default \(\frac {-\frac {b \tan \left (f x +e \right )}{\left (a -b \right ) a \sqrt {a +b \tan \left (f x +e \right )^{2}}}+\frac {\sqrt {b^{4} \left (a -b \right )}\, \arctan \left (\frac {b^{2} \left (a -b \right ) \tan \left (f x +e \right )}{\sqrt {b^{4} \left (a -b \right )}\, \sqrt {a +b \tan \left (f x +e \right )^{2}}}\right )}{\left (a -b \right )^{2} b^{2}}}{f}\) \(102\)

[In]

int(1/(a+b*tan(f*x+e)^2)^(3/2),x,method=_RETURNVERBOSE)

[Out]

1/f*(-b/(a-b)*tan(f*x+e)/a/(a+b*tan(f*x+e)^2)^(1/2)+1/(a-b)^2*(b^4*(a-b))^(1/2)/b^2*arctan(b^2*(a-b)/(b^4*(a-b
))^(1/2)/(a+b*tan(f*x+e)^2)^(1/2)*tan(f*x+e)))

Fricas [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 310, normalized size of antiderivative = 3.65 \[ \int \frac {1}{\left (a+b \tan ^2(e+f x)\right )^{3/2}} \, dx=\left [\frac {{\left (a b \tan \left (f x + e\right )^{2} + a^{2}\right )} \sqrt {-a + b} \log \left (-\frac {{\left (a - 2 \, b\right )} \tan \left (f x + e\right )^{2} + 2 \, \sqrt {b \tan \left (f x + e\right )^{2} + a} \sqrt {-a + b} \tan \left (f x + e\right ) - a}{\tan \left (f x + e\right )^{2} + 1}\right ) - 2 \, \sqrt {b \tan \left (f x + e\right )^{2} + a} {\left (a b - b^{2}\right )} \tan \left (f x + e\right )}{2 \, {\left ({\left (a^{3} b - 2 \, a^{2} b^{2} + a b^{3}\right )} f \tan \left (f x + e\right )^{2} + {\left (a^{4} - 2 \, a^{3} b + a^{2} b^{2}\right )} f\right )}}, \frac {{\left (a b \tan \left (f x + e\right )^{2} + a^{2}\right )} \sqrt {a - b} \arctan \left (-\frac {\sqrt {b \tan \left (f x + e\right )^{2} + a}}{\sqrt {a - b} \tan \left (f x + e\right )}\right ) - \sqrt {b \tan \left (f x + e\right )^{2} + a} {\left (a b - b^{2}\right )} \tan \left (f x + e\right )}{{\left (a^{3} b - 2 \, a^{2} b^{2} + a b^{3}\right )} f \tan \left (f x + e\right )^{2} + {\left (a^{4} - 2 \, a^{3} b + a^{2} b^{2}\right )} f}\right ] \]

[In]

integrate(1/(a+b*tan(f*x+e)^2)^(3/2),x, algorithm="fricas")

[Out]

[1/2*((a*b*tan(f*x + e)^2 + a^2)*sqrt(-a + b)*log(-((a - 2*b)*tan(f*x + e)^2 + 2*sqrt(b*tan(f*x + e)^2 + a)*sq
rt(-a + b)*tan(f*x + e) - a)/(tan(f*x + e)^2 + 1)) - 2*sqrt(b*tan(f*x + e)^2 + a)*(a*b - b^2)*tan(f*x + e))/((
a^3*b - 2*a^2*b^2 + a*b^3)*f*tan(f*x + e)^2 + (a^4 - 2*a^3*b + a^2*b^2)*f), ((a*b*tan(f*x + e)^2 + a^2)*sqrt(a
 - b)*arctan(-sqrt(b*tan(f*x + e)^2 + a)/(sqrt(a - b)*tan(f*x + e))) - sqrt(b*tan(f*x + e)^2 + a)*(a*b - b^2)*
tan(f*x + e))/((a^3*b - 2*a^2*b^2 + a*b^3)*f*tan(f*x + e)^2 + (a^4 - 2*a^3*b + a^2*b^2)*f)]

Sympy [F]

\[ \int \frac {1}{\left (a+b \tan ^2(e+f x)\right )^{3/2}} \, dx=\int \frac {1}{\left (a + b \tan ^{2}{\left (e + f x \right )}\right )^{\frac {3}{2}}}\, dx \]

[In]

integrate(1/(a+b*tan(f*x+e)**2)**(3/2),x)

[Out]

Integral((a + b*tan(e + f*x)**2)**(-3/2), x)

Maxima [F(-2)]

Exception generated. \[ \int \frac {1}{\left (a+b \tan ^2(e+f x)\right )^{3/2}} \, dx=\text {Exception raised: ValueError} \]

[In]

integrate(1/(a+b*tan(f*x+e)^2)^(3/2),x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(b-a>0)', see `assume?` for mor
e details)Is

Giac [F]

\[ \int \frac {1}{\left (a+b \tan ^2(e+f x)\right )^{3/2}} \, dx=\int { \frac {1}{{\left (b \tan \left (f x + e\right )^{2} + a\right )}^{\frac {3}{2}}} \,d x } \]

[In]

integrate(1/(a+b*tan(f*x+e)^2)^(3/2),x, algorithm="giac")

[Out]

integrate((b*tan(f*x + e)^2 + a)^(-3/2), x)

Mupad [F(-1)]

Timed out. \[ \int \frac {1}{\left (a+b \tan ^2(e+f x)\right )^{3/2}} \, dx=\int \frac {1}{{\left (b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a\right )}^{3/2}} \,d x \]

[In]

int(1/(a + b*tan(e + f*x)^2)^(3/2),x)

[Out]

int(1/(a + b*tan(e + f*x)^2)^(3/2), x)